import {Tool} from "@/utils/tool";
import {MD5} from "@/utils/md5";
import {SessionStorage} from "@/utils/session-storage";
import {Formattimes} from "@/utils/formattimes";
import {LocalStorage} from "@/utils/local-storage";
import RightToolbar from "@/components/RightToolbar/index.vue";
import DictTag from "@/components/DictTag/index.vue";
import DictSpan from "@/components/DictSpan/index.vue";
import {Filter} from "@/filter/filter";
import FmTable from "@/components/common/Table/FmTable.vue"
import FmSelectTable from "@/components/common/Table/FmSelectTable.vue"
import FmTreeTable from "@/components/common/Table/FmTreeTable.vue"
import CustomTooltip from "@/components/common/label/CustomTooltip.vue"

import "echarts";
import ECharts from 'vue-echarts'

export const RegisterUtils=(App:any) =>{
        App.provide('$Tool' , Tool.getInstance());
        App.provide('$MD5' , MD5.getInstance());
        App.provide('$SessionStorage', SessionStorage.getInstance());
        App.provide('$Formattimes',Formattimes.getInstance());
        App.provide('$LocalStorage',LocalStorage.getInstance());
        App.provide("$Filter",Filter.getInstance());
        App.component('v-chart', ECharts)
        App.component('RightToolbar',RightToolbar);
        App.component('DictTag',DictTag);
        App.component('DictSpan',DictSpan);
        App.component('FmTable',FmTable);
        App.component('FmSelectTable',FmSelectTable);
        App.component('FmTreeTable',FmTreeTable);
        App.component('CustomTooltip',CustomTooltip);
}
